<?php
    // Send Header
    $xls->setHeader('Reporte_'.date('Y_m_d').'.xls');

    // XLS Data Cell
    $xls->BOF();
    $xls->writeLabel(1,0,"VENETEL");
    $xls->writeLabel(2,0,"Reporte de Entregables : ");

    $xls->writeLabel(4,0,"ID");
    $xls->writeLabel(4,1,"Servicio");
    $xls->writeLabel(4,2,"Entregable");
	$xls->writeLabel(4,2,"Descripcion");

	$x = 5;
	$y = 0;

	foreach ($entregables as $entregable){
    $xls->writeLabel($x, $y++, $entregable['Entregable']['id']);
    $xls->writeLabel($x, $y++, $entregable['Entregable']['servicio_id']);
    $xls->writeLabel($x, $y++, $entregable['Entregable']['nm_entregable']);
    $xls->writeLabel($x, $y++, $entregable['Entregable']['descrip']);
	$x++;
		if($y === 4) {
			$y = 0;
		}
	}

    $xls->EOF();
    exit();
?>